/**
 * 组件样式
 */
.top-nav {
  width: 100%;
  height: 60px;
  padding: 0 20px;
  box-sizing: border-box;
  background-color: var(--el-color-primary);
  border-bottom: 1px solid var(--el-border-color-light);

  .theme-select {
    width: 110px;
    .el-select__wrapper {
      background-color: rgba(255, 255, 255, 0.2);
      box-shadow: 0 0 0 1px var(--el-border-color) inset;
    }
    .el-select__placeholder,
    .el-select__icon {
      color: white;
    }
  }
}

.left-content {
  width: 250px;
  padding: 15px;
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
  border-right: 1px solid #e0e0e0;
  .component-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    .component-item {
      user-select: none;
      background-color: #ecf0f1;
      border: 1px solid #e0e0e0;
      border-radius: 6px;
      padding: 10px;
      cursor: grab;
      transition: all 0.2s;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      position: relative;
      i {
        font-size: 24px;
        margin-bottom: 5px;
        color: var(--el-color-secondary);
        transition: color 0.3s;
      }
      span {
        font-size: 14px;
        color: #555555;
      }
      .fa-trash {
        top: 5px;
        right: 5px;
        font-size: 16px;
        cursor: pointer;
        position: absolute;
        display: none;
      }
      &:hover {
        .fa-trash {
          display: block;
        }
      }
    }
    .component-item:hover {
      background-color: #d6eaf8;
      border-color: var(--el-color-secondary);
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
    }
  }
}

.center-content {
  flex: 1;
  padding: 5px;
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
  background-color: #f8fafc;
  .workspace {
    min-height: 100%;
    background: white;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 5px;
    border: 2px dashed #e0e0e0;
    position: relative;
  }
  .workspace-placeholder {
    top: 50%;
    left: 50%;
    color: #bdc3c7;
    position: absolute;
    text-align: center;
    transform: translate(-50%, -50%);
  }
  .add-node-line {
    height: 4px;
    position: fixed;
    transition: all 0.3s;
    background-color: var(--el-color-secondary);
  }
}

.right-content {
  width: 300px;
  padding: 15px;
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
  border-left: 1px solid #e0e0e0;
}

.xml-node {
  border-radius: 6px;
  margin-bottom: 5px;
  background-color: white;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  .xml-node-header {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    .node-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 500;
    }
    .node-actions {
      display: flex;
      gap: 8px;
      .node-action {
        border: none;
        color: #7f8c8d;
        cursor: pointer;
        font-size: 16px;
        background: transparent;
      }
      .node-action:hover {
        color: var(--el-color-secondary);
      }
      .node-move {
        cursor: move;
      }
    }
  }
  .xml-node-content {
    padding: 5px;
    min-height: 100px;
    position: relative;
    border: 1px dashed var(--el-color-secondary);
    box-sizing: border-box;
  }
  &.xml-node-active {
    >.xml-node-header {
      background-color: #dddedf;
      border: 1px solid var(--el-color-secondary);
    }
  }
  &.chosen {
    border: 1px solid var(--el-color-secondary);
  }
}

.panel-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333333;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-content {
  position: relative;
  .code-content-box {
    width: 100%;
    height: 400px;
    overflow: auto;
    background-color: rgba(153, 153, 153, 0.2);
  }
  .fa-copy:hover {
    color: var(--el-color-secondary);
  }
}


